#ifndef _X_H_
#define _X_H_

#include <mutex>
#include <ostream>

using namespace std;

class X {
	public:
		X();
		X(const X& x);
		explicit X(int d);
		friend void swap(X& x1, X& x2);
		friend bool operator == (const X& x1, const X& x2);
		friend ostream& operator << (ostream& os, const X& x);
		int getData() const;
		virtual ~X();
	private:
		mutable mutex m;
		int data;
};

#endif

